#include "stdafx.h"
#include "service\storage\file\PlayerFileService.h"
#include "model\BaseModel.h"
#include "model\Player.h"


PlayerFileService::PlayerFileService() {

}

PlayerFileService::PlayerFileService(const std::string fname,
                                     const std::ios::openmode mode)
    : BaseFileService(fname, mode) {

}

PlayerFileService::PlayerFileService(std::fstream& file) : BaseFileService(file) {

}

PlayerFileService::~PlayerFileService() {

}

BaseFileService& PlayerFileService::Load(Player* player) {
  file() >> *player;
  return *this;
}


BaseFileService& PlayerFileService::Save(const Player& player) {
  file() << player;
  return *this;
}
